name: gcc-11

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]
  workflow_dispatch:

jobs:
  gcc11:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        cxxflags: ['"-O3 -std=c++20 -DRA_DO_OPT_SMALLVECTOR=0"',
                   '"-O3 -std=c++20 -DRA_DO_OPT_SMALLVECTOR=1"',
                   '"-O3 -DRA_DO_CHECK=0 -DNDEBUG -std=c++20"',
                   '"-O3 -std=c++2b"']
    steps:
    - uses: actions/checkout@v3
    - name: update
      run: |
         sudo apt update
         sudo apt install gcc-11 g++-11
    - name: configure
      run: CXXFLAGS=${{matrix.cxxflags}} cmake .
      env:
        CXX: g++-11
        CC: gcc-11
    - name: make
      run: make
    - name: make test
      run: make test
